﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1.Essential
{
	public class MainCollection
	{
        public static void Main()
        {
            List<int> list = new List<int>();
            list.Add(1);
            list.Add(2);
            list.Add(3);
            list.Add(4);
            list.Add(5);

            List<int> result = list.FindAll(Even);
            foreach (int n in result)
            {
                Console.WriteLine(n);
            }
        }

        public static bool Even(int value)
        {
            return (value % 2 == 0);
        }
	}
}
